<template>
	<div @click.stop="onClickHandler()" :style="componentModel.cssStyle" :class="[selected ?'row-selected-state '+componentModel.cssClass : 'row-normal-state '+componentModel.cssClass]" style="position: relative;">
		<i class="el-icon-rank drag-widget" style="position: absolute;left: 0px;top:0px;z-index: 100;" v-show="selected"></i>
		明细报表
	</div>
</template>

<script>
	import utils from '@/utils/utils.js';
	import formDesignerUtil from '@/utils/formDesignerUtil.js';
	export default {
		name: "DesignDetailReportComponent",
		props: [
			"componentModel"
		],
		data() {
			return {
				selected:false,
				"propertySet": [
					{
						"key": "ID","label":"ID","editor":"label"
					},{
						"key": "reportCode","label":"报表编码","editor":"textarea",
					},{
						"key": "cssStyleExpression","label":"cssStyle","editor":"textarea",
					},{
						"key": "cssClassExpression","label":"cssClass","editor":"textarea",
					}
				]
			}
		},inject:['children'],
		mounted() {
			this.children.push(this);
		},beforeUnmount() {
			utils.removeArrayElement(this.children,this);
		},
		methods: {
			onClickHandler() {
				formDesignerUtil.mobileComponentClickHandler(this);
			},setSelected(selected){
				this.selected=selected;	
			},getPropertyValue(propertyKey){
				if(propertyKey=="ID"){
					return formDesignerUtil.getComponentModelPropValue(this.componentModel,"id");
				}else if(propertyKey=="cssStyleExpression"){
					return formDesignerUtil.getComponentModelPropValue(this.componentModel,"cssStyle");
				}else if(propertyKey=="cssClassExpression"){
					return formDesignerUtil.getComponentModelPropValue(this.componentModel,"cssClass");
				}else if(propertyKey=="reportCode"){
					return formDesignerUtil.getComponentModelPropValue(this.componentModel,"reportCode");
				}
				return formDesignerUtil.getComponentModelCommonValue(this.componentModel,propertyKey);
			},setPropertyValue(propertyKey,propertyValue){
				formDesignerUtil.setComponentModelCommonValue(this.componentModel,propertyKey, propertyValue);
				if(propertyKey=="cssStyleExpression"){
					formDesignerUtil.setComponentModelPropValue(this.componentModel,"cssStyle",propertyValue);
				}else if(propertyKey=="cssClassExpression"){
					formDesignerUtil.setComponentModelPropValue(this.componentModel,"cssClass",propertyValue);
				}else if(propertyKey=="reportCode"){
					formDesignerUtil.setComponentModelPropValue(this.componentModel,"reportCode",propertyValue);
				}
			}
		}
	}
</script>

<style>
</style>
